<template>
  <div class="detail">
    <detail-banner></detail-banner>
    <detail-header></detail-header>
    <div class="content">
      <detail-list :list="list"></detail-list>
    </div>
  </div>
</template>

<script>
import DetailBanner from './components/Banner.vue'
import DetailHeader from './components/Header.vue'
import DetailList from './components/List.vue'
import axios from 'axios'

export default{
  name: 'Detail',
  data () {
    return {
      list: [
        {
          title: '成人票',
          children: [
            {
              title: '成人票一级'
            }, {
              title: '成人票二级'
            }, {
              title: '成人票三级'
            }, {
              title: '成人票四级'
            }
          ]
        },
        {
          title: '学生票'
        },
        {
          title: '特价票'
        }]
    }
  },
  methods: {
    getDetailInfo () {
      axios.get('/api/detail.json', {
        params: {
          id: this.$route.params.id
        }
      }).then(this.getDetailSucc)
    },
    getDetailSucc (resp) {
      console.log(resp)
    }
  },
  mounted () {
    this.getDetailInfo()
  },
  components: {
    DetailBanner,
    DetailHeader,
    DetailList
  }
}
</script>

<style lang="stylus" scoped>
  .detail
    background-color: #eeeeee
    .content
      height: 50rem
</style>
